package com.longge;

import java.util.HashSet;

public class MaximumNumberOfStringPairs {

    public int maximumNumberOfStringPairs(String[] words) {

        HashSet<String> set = new HashSet<>();

        int ans = 0;
        for (String word : words) {

            String rWord = reserve(word);
            if (set.contains(rWord)) {
                ans++;
            }
            set.add(word);
        }
        return ans;

    }

    private String reserve(String word) {

        char[] chars = word.toCharArray();
        StringBuilder sb = new StringBuilder();
        for (int i = chars.length - 1; i >= 0; i--) {
            sb.append(chars[i]);
        }
        return sb.toString();
    }

    public static void main(String[] args) {

        System.out.println((int)'a');


    }
}
